/**
 * Created by user on 2018/12/7.
 */
import React from 'react'
import { Route, Switch, Redirect } from 'react-router'
import About from './pages/About'
import Index from './pages/Index'
import User from './pages/User'
import NotMatch from './pages/NoMatch'


function RouterConfig() {
    return(
        <Switch>
            <Route path="/index" component={Index}></Route>
            <Redirect exact from="/" to="/index"></Redirect>
            <Route path="/about" component={About}></Route>
            <Route path="/user" component={User}></Route>
            <Route component={ NotMatch }/>
        </Switch>
    )
}

export default RouterConfig
